<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		
	</body>
	
	<script>
		
		function m1(){
			var num = 1;
			return function m2(){
				console.log(++num);
				return function(){
				
				}
			}
		}
		
		var m2 = m1();
		m2();
		m2();
		m2();
		m2();
		
		m1()();
		m1()();
		m1()();
		m1()();
		
		
		m1()()();
		
		
		
		function fn(x){
			return function(y){
				return function(z){
					return x*y*z;
				}
			}
		}
		
		//fn(2)(3)(4) ===》 24
		
		
	</script>
	
</html>